package com.hnx.admin.system.service.impl;

import com.hnx.admin.system.dao.SysUserSysUserDao;
import com.hnx.admin.system.dto.SysUserDTO;
import com.hnx.admin.system.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import java.util.Optional;

/*
创建人： 倔强的头发
创建时间：2025/4/24
功能描述:

*/
@Service
@RequiredArgsConstructor
public class UserServiceImpl implements UserService {
    private final SysUserSysUserDao sysUserSysUserDao;
    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
       SysUserDTO sysUserDTO = sysUserSysUserDao.selectByName(username);
        Optional.ofNullable(sysUserDTO).orElseThrow(() -> new UsernameNotFoundException("用户不存在"));
        return null;
    }
}
